import 'package:winkai/db/dao/msg_dao.dart';
import 'package:winkai/entity/msg_constant.dart';

class ChatMsg {
  ///文本
  static const int typeText = 1;

  ///视频
  static const int typeVideo = 2;

  ///图片
  static const int typeImage = 3;

  ///语音
  static const int typeVoice = 4;

  ///等待回答
  static const int typeWaitAnswer = 5;

  final int type;
  final bool isSend;
  final bool isPrivateMessage;
  MsgInfo messageInfo;

  String? get content => messageInfo.msg.contentType == MsgContentType.text
      ? messageInfo.msg.content
      : null;

  ChatMsg({

    required this.type,
    required this.messageInfo,
    this.isSend = true,
    this.isPrivateMessage = false,
  });
}
